.class public Lcom/zuiapps/suite/utils/image/ImageUtils;
.super Ljava/lang/Object;
.source "ImageUtils.java"


# static fields
.field public static final REQUEST_CODE_GETIMAGE_BYCAMERA:I = 0x1

.field public static final REQUEST_CODE_GETIMAGE_BYCROP:I = 0x2

.field public static final REQUEST_CODE_GETIMAGE_BYSDCARD:I = 0x0

.field public static final SDCARD:Ljava/lang/String; = "/sdcard"

.field public static final SDCARD_MNT:Ljava/lang/String; = "/mnt/sdcard"


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 43
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static bitmapToDrawable(Landroid/graphics/Bitmap;)Landroid/graphics/drawable/Drawable;
    .registers 2
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;

    .prologue
    .line 561
    new-instance v0, Landroid/graphics/drawable/BitmapDrawable;

    invoke-direct {v0, p0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

    .line 562
    .local v0, "drawable":Landroid/graphics/drawable/Drawable;
    return-object v0
.end method

.method public static createImageThumbnail(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;II)V
    .registers 13
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "largeImagePath"    # Ljava/lang/String;
    .param p2, "thumbfilePath"    # Ljava/lang/String;
    .param p3, "square_size"    # I
    .param p4, "quality"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x1

    .line 358
    new-instance v3, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v3}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 359
    .local v3, "opts":Landroid/graphics/BitmapFactory$Options;
    iput v6, v3, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 361
    invoke-static {p1, v3}, Lcom/zuiapps/suite/utils/image/ImageUtils;->getBitmapByPath(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 363
    .local v0, "cur_bitmap":Landroid/graphics/Bitmap;
    if-nez v0, :cond_10

    .line 374
    :goto_f
    return-void

    .line 367
    :cond_10
    const/4 v5, 0x2

    new-array v1, v5, [I

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    aput v5, v1, v7

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v5

    aput v5, v1, v6

    .line 369
    .local v1, "cur_img_size":[I
    invoke-static {v1, p3}, Lcom/zuiapps/suite/utils/image/ImageUtils;->scaleImageSize([II)[I

    move-result-object v2

    .line 371
    .local v2, "new_img_size":[I
    aget v5, v2, v7

    aget v6, v2, v6

    invoke-static {v0, v5, v6}, Lcom/zuiapps/suite/utils/image/ImageUtils;->zoomBitmap(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 373
    .local v4, "thb_bitmap":Landroid/graphics/Bitmap;
    invoke-static {p2, v4, p4}, Lcom/zuiapps/suite/utils/image/ImageUtils;->saveImageToSD(Ljava/lang/String;Landroid/graphics/Bitmap;I)V

    goto :goto_f
.end method

.method public static createReflectionImageWithOrigin(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .registers 27
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;

    .prologue
    .line 524
    const/16 v24, 0x4

    .line 525
    .local v24, "reflectionGap":I
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    .line 526
    .local v4, "width":I
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v22

    .line 528
    .local v22, "height":I
    new-instance v6, Landroid/graphics/Matrix;

    invoke-direct {v6}, Landroid/graphics/Matrix;-><init>()V

    .line 529
    .local v6, "matrix":Landroid/graphics/Matrix;
    const/high16 v1, 0x3f800000

    const/high16 v2, -0x40800000

    invoke-virtual {v6, v1, v2}, Landroid/graphics/Matrix;->preScale(FF)Z

    .line 531
    const/4 v2, 0x0

    div-int/lit8 v3, v22, 0x2

    div-int/lit8 v5, v22, 0x2

    const/4 v7, 0x0

    move-object/from16 v1, p0

    invoke-static/range {v1 .. v7}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v25

    .line 533
    .local v25, "reflectionImage":Landroid/graphics/Bitmap;
    div-int/lit8 v1, v22, 0x2

    add-int v1, v1, v22

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v4, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v21

    .line 535
    .local v21, "bitmapWithReflection":Landroid/graphics/Bitmap;
    new-instance v7, Landroid/graphics/Canvas;

    move-object/from16 v0, v21

    invoke-direct {v7, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 536
    .local v7, "canvas":Landroid/graphics/Canvas;
    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v3, 0x0

    move-object/from16 v0, p0

    invoke-virtual {v7, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 537
    new-instance v12, Landroid/graphics/Paint;

    invoke-direct {v12}, Landroid/graphics/Paint;-><init>()V

    .line 538
    .local v12, "deafalutPaint":Landroid/graphics/Paint;
    const/4 v8, 0x0

    move/from16 v0, v22

    int-to-float v9, v0

    int-to-float v10, v4

    add-int/lit8 v1, v22, 0x4

    int-to-float v11, v1

    invoke-virtual/range {v7 .. v12}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    .line 540
    const/4 v1, 0x0

    add-int/lit8 v2, v22, 0x4

    int-to-float v2, v2

    const/4 v3, 0x0

    move-object/from16 v0, v25

    invoke-virtual {v7, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 542
    new-instance v23, Landroid/graphics/Paint;

    invoke-direct/range {v23 .. v23}, Landroid/graphics/Paint;-><init>()V

    .line 543
    .local v23, "paint":Landroid/graphics/Paint;
    new-instance v13, Landroid/graphics/LinearGradient;

    const/4 v14, 0x0

    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    int-to-float v15, v1

    const/16 v16, 0x0

    invoke-virtual/range {v21 .. v21}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    add-int/lit8 v1, v1, 0x4

    int-to-float v0, v1

    move/from16 v17, v0

    const v18, 0x70ffffff

    const v19, 0xffffff

    sget-object v20, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;

    invoke-direct/range {v13 .. v20}, Landroid/graphics/LinearGradient;-><init>(FFFFIILandroid/graphics/Shader$TileMode;)V

    .line 545
    .local v13, "shader":Landroid/graphics/LinearGradient;
    move-object/from16 v0, v23

    invoke-virtual {v0, v13}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;

    .line 547
    new-instance v1, Landroid/graphics/PorterDuffXfermode;

    sget-object v2, Landroid/graphics/PorterDuff$Mode;->DST_IN:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v1, v2}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V

    move-object/from16 v0, v23

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 549
    const/4 v15, 0x0

    move/from16 v0, v22

    int-to-float v0, v0

    move/from16 v16, v0

    int-to-float v0, v4

    move/from16 v17, v0

    invoke-virtual/range {v21 .. v21}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    add-int/lit8 v1, v1, 0x4

    int-to-float v0, v1

    move/from16 v18, v0

    move-object v14, v7

    move-object/from16 v19, v23

    invoke-virtual/range {v14 .. v19}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    .line 551
    return-object v21
.end method

.method public static drawableToBitmap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;
    .registers 8
    .param p0, "drawable"    # Landroid/graphics/drawable/Drawable;

    .prologue
    const/4 v6, 0x0

    .line 478
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v3

    .line 479
    .local v3, "width":I
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v2

    .line 480
    .local v2, "height":I
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getOpacity()I

    move-result v4

    const/4 v5, -0x1

    if-eq v4, v5, :cond_22

    sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    :goto_12
    invoke-static {v3, v2, v4}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 481
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 482
    .local v1, "canvas":Landroid/graphics/Canvas;
    invoke-virtual {p0, v6, v6, v3, v2}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 483
    invoke-virtual {p0, v1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 484
    return-object v0

    .line 480
    .end local v0    # "bitmap":Landroid/graphics/Bitmap;
    .end local v1    # "canvas":Landroid/graphics/Canvas;
    :cond_22
    sget-object v4, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    goto :goto_12
.end method

.method public static drawableToFile(Landroid/graphics/drawable/Drawable;Ljava/lang/String;)V
    .registers 11
    .param p0, "drawable"    # Landroid/graphics/drawable/Drawable;
    .param p1, "path"    # Ljava/lang/String;

    .prologue
    .line 56
    new-instance v4, Ljava/io/File;

    invoke-direct {v4, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 57
    .local v4, "file":Ljava/io/File;
    check-cast p0, Landroid/graphics/drawable/BitmapDrawable;

    .end local p0    # "drawable":Landroid/graphics/drawable/Drawable;
    invoke-virtual {p0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 58
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    new-instance v2, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v2}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 59
    .local v2, "bos":Ljava/io/ByteArrayOutputStream;
    sget-object v7, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v8, 0x64

    invoke-virtual {v0, v7, v8, v2}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 60
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v1

    .line 63
    .local v1, "bitmapdata":[B
    const/4 v5, 0x0

    .line 65
    .local v5, "fos":Ljava/io/FileOutputStream;
    :try_start_1c
    new-instance v6, Ljava/io/FileOutputStream;

    invoke-direct {v6, v4}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_21
    .catch Ljava/io/FileNotFoundException; {:try_start_1c .. :try_end_21} :catch_31
    .catch Ljava/io/IOException; {:try_start_1c .. :try_end_21} :catch_40
    .catchall {:try_start_1c .. :try_end_21} :catchall_4f

    .line 66
    .end local v5    # "fos":Ljava/io/FileOutputStream;
    .local v6, "fos":Ljava/io/FileOutputStream;
    :try_start_21
    invoke-virtual {v6, v1}, Ljava/io/FileOutputStream;->write([B)V
    :try_end_24
    .catch Ljava/io/FileNotFoundException; {:try_start_21 .. :try_end_24} :catch_61
    .catch Ljava/io/IOException; {:try_start_21 .. :try_end_24} :catch_5e
    .catchall {:try_start_21 .. :try_end_24} :catchall_5b

    .line 73
    if-eqz v6, :cond_29

    .line 74
    :try_start_26
    invoke-virtual {v6}, Ljava/io/FileOutputStream;->close()V
    :try_end_29
    .catch Ljava/io/IOException; {:try_start_26 .. :try_end_29} :catch_2b

    :cond_29
    move-object v5, v6

    .line 80
    .end local v6    # "fos":Ljava/io/FileOutputStream;
    .restart local v5    # "fos":Ljava/io/FileOutputStream;
    :cond_2a
    :goto_2a
    return-void

    .line 75
    .end local v5    # "fos":Ljava/io/FileOutputStream;
    .restart local v6    # "fos":Ljava/io/FileOutputStream;
    :catch_2b
    move-exception v3

    .line 76
    .local v3, "e":Ljava/io/IOException;
    invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V

    move-object v5, v6

    .line 78
    .end local v6    # "fos":Ljava/io/FileOutputStream;
    .restart local v5    # "fos":Ljava/io/FileOutputStream;
    goto :goto_2a

    .line 67
    .end local v3    # "e":Ljava/io/IOException;
    :catch_31
    move-exception v3

    .line 68
    .local v3, "e":Ljava/io/FileNotFoundException;
    :goto_32
    :try_start_32
    invoke-virtual {v3}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_35
    .catchall {:try_start_32 .. :try_end_35} :catchall_4f

    .line 73
    if-eqz v5, :cond_2a

    .line 74
    :try_start_37
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->close()V
    :try_end_3a
    .catch Ljava/io/IOException; {:try_start_37 .. :try_end_3a} :catch_3b

    goto :goto_2a

    .line 75
    :catch_3b
    move-exception v3

    .line 76
    .local v3, "e":Ljava/io/IOException;
    invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_2a

    .line 69
    .end local v3    # "e":Ljava/io/IOException;
    :catch_40
    move-exception v3

    .line 70
    .restart local v3    # "e":Ljava/io/IOException;
    :goto_41
    :try_start_41
    invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V
    :try_end_44
    .catchall {:try_start_41 .. :try_end_44} :catchall_4f

    .line 73
    if-eqz v5, :cond_2a

    .line 74
    :try_start_46
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->close()V
    :try_end_49
    .catch Ljava/io/IOException; {:try_start_46 .. :try_end_49} :catch_4a

    goto :goto_2a

    .line 75
    :catch_4a
    move-exception v3

    .line 76
    invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_2a

    .line 72
    .end local v3    # "e":Ljava/io/IOException;
    :catchall_4f
    move-exception v7

    .line 73
    :goto_50
    if-eqz v5, :cond_55

    .line 74
    :try_start_52
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->close()V
    :try_end_55
    .catch Ljava/io/IOException; {:try_start_52 .. :try_end_55} :catch_56

    .line 77
    :cond_55
    :goto_55
    throw v7

    .line 75
    :catch_56
    move-exception v3

    .line 76
    .restart local v3    # "e":Ljava/io/IOException;
    invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_55

    .line 72
    .end local v3    # "e":Ljava/io/IOException;
    .end local v5    # "fos":Ljava/io/FileOutputStream;
    .restart local v6    # "fos":Ljava/io/FileOutputStream;
    :catchall_5b
    move-exception v7

    move-object v5, v6

    .end local v6    # "fos":Ljava/io/FileOutputStream;
    .restart local v5    # "fos":Ljava/io/FileOutputStream;
    goto :goto_50

    .line 69
    .end local v5    # "fos":Ljava/io/FileOutputStream;
    .restart local v6    # "fos":Ljava/io/FileOutputStream;
    :catch_5e
    move-exception v3

    move-object v5, v6

    .end local v6    # "fos":Ljava/io/FileOutputStream;
    .restart local v5    # "fos":Ljava/io/FileOutputStream;
    goto :goto_41

    .line 67
    .end local v5    # "fos":Ljava/io/FileOutputStream;
    .restart local v6    # "fos":Ljava/io/FileOutputStream;
    :catch_61
    move-exception v3

    move-object v5, v6

    .end local v6    # "fos":Ljava/io/FileOutputStream;
    .restart local v5    # "fos":Ljava/io/FileOutputStream;
    goto :goto_32
.end method

.method public static getAbsoluteImagePath(Landroid/app/Activity;Landroid/net/Uri;)Ljava/lang/String;
    .registers 11
    .param p0, "context"    # Landroid/app/Activity;
    .param p1, "uri"    # Landroid/net/Uri;

    .prologue
    const/4 v3, 0x0

    .line 261
    const-string v8, ""

    .line 262
    .local v8, "imagePath":Ljava/lang/String;
    const/4 v0, 0x1

    new-array v2, v0, [Ljava/lang/String;

    const/4 v0, 0x0

    const-string v1, "_data"

    aput-object v1, v2, v0

    .local v2, "proj":[Ljava/lang/String;
    move-object v0, p0

    move-object v1, p1

    move-object v4, v3

    move-object v5, v3

    .line 263
    invoke-virtual/range {v0 .. v5}, Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 269
    .local v7, "cursor":Landroid/database/Cursor;
    if-eqz v7, :cond_2b

    .line 270
    const-string v0, "_data"

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v6

    .line 271
    .local v6, "column_index":I
    invoke-interface {v7}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_2b

    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0

    if-eqz v0, :cond_2b

    .line 272
    invoke-interface {v7, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 276
    .end local v6    # "column_index":I
    :cond_2b
    return-object v8
.end method

.method public static getAbsolutePathFromNoStandardUri(Landroid/net/Uri;)Ljava/lang/String;
    .registers 7
    .param p0, "mUri"    # Landroid/net/Uri;

    .prologue
    .line 238
    const/4 v0, 0x0

    .line 240
    .local v0, "filePath":Ljava/lang/String;
    invoke-virtual {p0}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v1

    .line 241
    .local v1, "mUriString":Ljava/lang/String;
    invoke-static {v1}, Landroid/net/Uri;->decode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 243
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "file:///sdcard"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v5, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 244
    .local v2, "pre1":Ljava/lang/String;
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "file:///mnt/sdcard"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v5, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 246
    .local v3, "pre2":Ljava/lang/String;
    invoke-virtual {v1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_61

    .line 247
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v5, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v5

    invoke-virtual {v1, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 251
    :cond_60
    :goto_60
    return-object v0

    .line 248
    :cond_61
    invoke-virtual {v1, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_60

    .line 249
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v5, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v5

    invoke-virtual {v1, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_60
.end method

.method public static getBitmap(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;
    .registers 7
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "fileName"    # Ljava/lang/String;

    .prologue
    .line 137
    const/4 v2, 0x0

    .line 138
    .local v2, "fis":Ljava/io/FileInputStream;
    const/4 v0, 0x0

    .line 140
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    :try_start_2
    invoke-virtual {p0, p1}, Landroid/content/Context;->openFileInput(Ljava/lang/String;)Ljava/io/FileInputStream;

    move-result-object v2

    .line 141
    invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;
    :try_end_9
    .catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_9} :catch_e
    .catch Ljava/lang/OutOfMemoryError; {:try_start_2 .. :try_end_9} :catch_18
    .catchall {:try_start_2 .. :try_end_9} :catchall_22

    move-result-object v0

    .line 148
    :try_start_a
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_d} :catch_27

    .line 152
    :goto_d
    return-object v0

    .line 142
    :catch_e
    move-exception v1

    .line 143
    .local v1, "e":Ljava/io/FileNotFoundException;
    :try_start_f
    invoke-virtual {v1}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_12
    .catchall {:try_start_f .. :try_end_12} :catchall_22

    .line 148
    :try_start_12
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_15
    .catch Ljava/lang/Exception; {:try_start_12 .. :try_end_15} :catch_16

    goto :goto_d

    .line 149
    :catch_16
    move-exception v3

    goto :goto_d

    .line 144
    .end local v1    # "e":Ljava/io/FileNotFoundException;
    :catch_18
    move-exception v1

    .line 145
    .local v1, "e":Ljava/lang/OutOfMemoryError;
    :try_start_19
    invoke-virtual {v1}, Ljava/lang/OutOfMemoryError;->printStackTrace()V
    :try_end_1c
    .catchall {:try_start_19 .. :try_end_1c} :catchall_22

    .line 148
    :try_start_1c
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_1f
    .catch Ljava/lang/Exception; {:try_start_1c .. :try_end_1f} :catch_20

    goto :goto_d

    .line 149
    :catch_20
    move-exception v3

    goto :goto_d

    .line 147
    .end local v1    # "e":Ljava/lang/OutOfMemoryError;
    :catchall_22
    move-exception v3

    .line 148
    :try_start_23
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_26
    .catch Ljava/lang/Exception; {:try_start_23 .. :try_end_26} :catch_29

    .line 150
    :goto_26
    throw v3

    .line 149
    :catch_27
    move-exception v3

    goto :goto_d

    :catch_29
    move-exception v4

    goto :goto_26
.end method

.method public static getBitmapByFile(Ljava/io/File;)Landroid/graphics/Bitmap;
    .registers 7
    .param p0, "file"    # Ljava/io/File;

    .prologue
    .line 192
    const/4 v2, 0x0

    .line 193
    .local v2, "fis":Ljava/io/FileInputStream;
    const/4 v0, 0x0

    .line 195
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    :try_start_2
    new-instance v3, Ljava/io/FileInputStream;

    invoke-direct {v3, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_7
    .catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_7} :catch_13
    .catch Ljava/lang/OutOfMemoryError; {:try_start_2 .. :try_end_7} :catch_1d
    .catchall {:try_start_2 .. :try_end_7} :catchall_27

    .line 196
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .local v3, "fis":Ljava/io/FileInputStream;
    :try_start_7
    invoke-static {v3}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;
    :try_end_a
    .catch Ljava/io/FileNotFoundException; {:try_start_7 .. :try_end_a} :catch_34
    .catch Ljava/lang/OutOfMemoryError; {:try_start_7 .. :try_end_a} :catch_31
    .catchall {:try_start_7 .. :try_end_a} :catchall_2e

    move-result-object v0

    .line 203
    :try_start_b
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_e
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_e} :catch_10

    move-object v2, v3

    .line 207
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :goto_f
    return-object v0

    .line 204
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    :catch_10
    move-exception v4

    move-object v2, v3

    .line 206
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    goto :goto_f

    .line 197
    :catch_13
    move-exception v1

    .line 198
    .local v1, "e":Ljava/io/FileNotFoundException;
    :goto_14
    :try_start_14
    invoke-virtual {v1}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_17
    .catchall {:try_start_14 .. :try_end_17} :catchall_27

    .line 203
    :try_start_17
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_1a
    .catch Ljava/lang/Exception; {:try_start_17 .. :try_end_1a} :catch_1b

    goto :goto_f

    .line 204
    :catch_1b
    move-exception v4

    goto :goto_f

    .line 199
    .end local v1    # "e":Ljava/io/FileNotFoundException;
    :catch_1d
    move-exception v1

    .line 200
    .local v1, "e":Ljava/lang/OutOfMemoryError;
    :goto_1e
    :try_start_1e
    invoke-virtual {v1}, Ljava/lang/OutOfMemoryError;->printStackTrace()V
    :try_end_21
    .catchall {:try_start_1e .. :try_end_21} :catchall_27

    .line 203
    :try_start_21
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_24
    .catch Ljava/lang/Exception; {:try_start_21 .. :try_end_24} :catch_25

    goto :goto_f

    .line 204
    :catch_25
    move-exception v4

    goto :goto_f

    .line 202
    .end local v1    # "e":Ljava/lang/OutOfMemoryError;
    :catchall_27
    move-exception v4

    .line 203
    :goto_28
    :try_start_28
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_2b
    .catch Ljava/lang/Exception; {:try_start_28 .. :try_end_2b} :catch_2c

    .line 205
    :goto_2b
    throw v4

    .line 204
    :catch_2c
    move-exception v5

    goto :goto_2b

    .line 202
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    :catchall_2e
    move-exception v4

    move-object v2, v3

    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    goto :goto_28

    .line 199
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    :catch_31
    move-exception v1

    move-object v2, v3

    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    goto :goto_1e

    .line 197
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    :catch_34
    move-exception v1

    move-object v2, v3

    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    goto :goto_14
.end method

.method public static getBitmapByPath(Ljava/lang/String;)Landroid/graphics/Bitmap;
    .registers 2
    .param p0, "filePath"    # Ljava/lang/String;

    .prologue
    .line 162
    const/4 v0, 0x0

    invoke-static {p0, v0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->getBitmapByPath(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method public static getBitmapByPath(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    .registers 9
    .param p0, "filePath"    # Ljava/lang/String;
    .param p1, "opts"    # Landroid/graphics/BitmapFactory$Options;

    .prologue
    .line 166
    const/4 v3, 0x0

    .line 167
    .local v3, "fis":Ljava/io/FileInputStream;
    const/4 v0, 0x0

    .line 169
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    :try_start_2
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 170
    .local v2, "file":Ljava/io/File;
    new-instance v4, Ljava/io/FileInputStream;

    invoke-direct {v4, v2}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_c
    .catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_c} :catch_19
    .catch Ljava/lang/OutOfMemoryError; {:try_start_2 .. :try_end_c} :catch_23
    .catchall {:try_start_2 .. :try_end_c} :catchall_2d

    .line 171
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .local v4, "fis":Ljava/io/FileInputStream;
    const/4 v5, 0x0

    :try_start_d
    invoke-static {v4, v5, p1}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_10
    .catch Ljava/io/FileNotFoundException; {:try_start_d .. :try_end_10} :catch_3a
    .catch Ljava/lang/OutOfMemoryError; {:try_start_d .. :try_end_10} :catch_37
    .catchall {:try_start_d .. :try_end_10} :catchall_34

    move-result-object v0

    .line 178
    :try_start_11
    invoke-virtual {v4}, Ljava/io/FileInputStream;->close()V
    :try_end_14
    .catch Ljava/lang/Exception; {:try_start_11 .. :try_end_14} :catch_16

    move-object v3, v4

    .line 182
    .end local v2    # "file":Ljava/io/File;
    .end local v4    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    :goto_15
    return-object v0

    .line 179
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "file":Ljava/io/File;
    .restart local v4    # "fis":Ljava/io/FileInputStream;
    :catch_16
    move-exception v5

    move-object v3, v4

    .line 181
    .end local v4    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    goto :goto_15

    .line 172
    .end local v2    # "file":Ljava/io/File;
    :catch_19
    move-exception v1

    .line 173
    .local v1, "e":Ljava/io/FileNotFoundException;
    :goto_1a
    :try_start_1a
    invoke-virtual {v1}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_1d
    .catchall {:try_start_1a .. :try_end_1d} :catchall_2d

    .line 178
    :try_start_1d
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_20
    .catch Ljava/lang/Exception; {:try_start_1d .. :try_end_20} :catch_21

    goto :goto_15

    .line 179
    :catch_21
    move-exception v5

    goto :goto_15

    .line 174
    .end local v1    # "e":Ljava/io/FileNotFoundException;
    :catch_23
    move-exception v1

    .line 175
    .local v1, "e":Ljava/lang/OutOfMemoryError;
    :goto_24
    :try_start_24
    invoke-virtual {v1}, Ljava/lang/OutOfMemoryError;->printStackTrace()V
    :try_end_27
    .catchall {:try_start_24 .. :try_end_27} :catchall_2d

    .line 178
    :try_start_27
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_2a
    .catch Ljava/lang/Exception; {:try_start_27 .. :try_end_2a} :catch_2b

    goto :goto_15

    .line 179
    :catch_2b
    move-exception v5

    goto :goto_15

    .line 177
    .end local v1    # "e":Ljava/lang/OutOfMemoryError;
    :catchall_2d
    move-exception v5

    .line 178
    :goto_2e
    :try_start_2e
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_31
    .catch Ljava/lang/Exception; {:try_start_2e .. :try_end_31} :catch_32

    .line 180
    :goto_31
    throw v5

    .line 179
    :catch_32
    move-exception v6

    goto :goto_31

    .line 177
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "file":Ljava/io/File;
    .restart local v4    # "fis":Ljava/io/FileInputStream;
    :catchall_34
    move-exception v5

    move-object v3, v4

    .end local v4    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    goto :goto_2e

    .line 174
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v4    # "fis":Ljava/io/FileInputStream;
    :catch_37
    move-exception v1

    move-object v3, v4

    .end local v4    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    goto :goto_24

    .line 172
    .end local v3    # "fis":Ljava/io/FileInputStream;
    .restart local v4    # "fis":Ljava/io/FileInputStream;
    :catch_3a
    move-exception v1

    move-object v3, v4

    .end local v4    # "fis":Ljava/io/FileInputStream;
    .restart local v3    # "fis":Ljava/io/FileInputStream;
    goto :goto_1a
.end method

.method public static getBitmapFromMedia(Landroid/content/Context;Ljava/lang/String;II)Landroid/graphics/Bitmap;
    .registers 15
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "pathName"    # Ljava/lang/String;
    .param p2, "maxWidth"    # I
    .param p3, "maxHeight"    # I

    .prologue
    const/4 v9, 0x0

    .line 681
    const/4 v0, 0x0

    .line 682
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    new-instance v5, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v5}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 684
    .local v5, "options":Landroid/graphics/BitmapFactory$Options;
    const/4 v10, 0x1

    :try_start_8
    iput-boolean v10, v5, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 685
    invoke-static {p1, v5}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 686
    const/4 v10, 0x0

    iput-boolean v10, v5, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 688
    iget v7, v5, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    .line 689
    .local v7, "outputWidth":I
    iget v6, v5, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    .line 690
    .local v6, "outputHeight":I
    if-ge v7, p2, :cond_1e

    if-ge v6, p3, :cond_1e

    .line 691
    invoke-static {p1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    :goto_1c
    move-object v9, v0

    .line 711
    .end local v6    # "outputHeight":I
    .end local v7    # "outputWidth":I
    :goto_1d
    return-object v9

    .line 693
    .restart local v6    # "outputHeight":I
    .restart local v7    # "outputWidth":I
    :cond_1e
    const/4 v3, 0x0

    .line 694
    .local v3, "inSampleSize":I
    div-int v8, v7, p2

    .line 695
    .local v8, "widthSmapleSize":I
    div-int v2, v6, p3

    .line 696
    .local v2, "heightSmapleSize":I
    if-lt v8, v2, :cond_2d

    .line 697
    move v3, v8

    .line 701
    :goto_26
    iput v3, v5, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 702
    invoke-static {p1, v5}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_2b
    .catch Ljava/lang/OutOfMemoryError; {:try_start_8 .. :try_end_2b} :catch_2f
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_2b} :catch_34

    move-result-object v0

    goto :goto_1c

    .line 699
    :cond_2d
    move v3, v2

    goto :goto_26

    .line 705
    .end local v2    # "heightSmapleSize":I
    .end local v3    # "inSampleSize":I
    .end local v6    # "outputHeight":I
    .end local v7    # "outputWidth":I
    .end local v8    # "widthSmapleSize":I
    :catch_2f
    move-exception v4

    .line 706
    .local v4, "oom":Ljava/lang/OutOfMemoryError;
    invoke-static {}, Ljava/lang/System;->gc()V

    goto :goto_1d

    .line 708
    .end local v4    # "oom":Ljava/lang/OutOfMemoryError;
    :catch_34
    move-exception v1

    .line 709
    .local v1, "e":Ljava/lang/Exception;
    goto :goto_1d
.end method

.method public static getBitmapWH(Landroid/content/Context;Ljava/lang/String;)[I
    .registers 9
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "pathName"    # Ljava/lang/String;

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 665
    new-instance v1, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v1}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 666
    .local v1, "options":Landroid/graphics/BitmapFactory$Options;
    const/4 v3, 0x2

    new-array v2, v3, [I

    .line 668
    .local v2, "wh":[I
    const/4 v3, 0x1

    :try_start_b
    iput-boolean v3, v1, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 669
    invoke-static {p1, v1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 670
    const/4 v3, 0x0

    iput-boolean v3, v1, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 671
    const/4 v3, 0x0

    iget v4, v1, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    aput v4, v2, v3

    .line 672
    const/4 v3, 0x1

    iget v4, v1, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    aput v4, v2, v3
    :try_end_1d
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_1d} :catch_1e

    .line 677
    :goto_1d
    return-object v2

    .line 673
    :catch_1e
    move-exception v0

    .line 674
    .local v0, "e":Ljava/lang/Exception;
    aput v5, v2, v5

    .line 675
    aput v5, v2, v6

    goto :goto_1d
.end method

.method public static getCamerPath()Ljava/lang/String;
    .registers 2

    .prologue
    .line 228
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "FounderNews"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getImageType(Ljava/io/File;)Ljava/lang/String;
    .registers 7
    .param p0, "file"    # Ljava/io/File;

    .prologue
    const/4 v3, 0x0

    .line 572
    if-eqz p0, :cond_9

    invoke-virtual {p0}, Ljava/io/File;->exists()Z

    move-result v4

    if-nez v4, :cond_a

    .line 588
    :cond_9
    :goto_9
    return-object v3

    .line 575
    :cond_a
    const/4 v1, 0x0

    .line 577
    .local v1, "in":Ljava/io/InputStream;
    :try_start_b
    new-instance v2, Ljava/io/FileInputStream;

    invoke-direct {v2, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_10
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_10} :catch_1c
    .catchall {:try_start_b .. :try_end_10} :catchall_25

    .line 578
    .end local v1    # "in":Ljava/io/InputStream;
    .local v2, "in":Ljava/io/InputStream;
    :try_start_10
    invoke-static {v2}, Lcom/zuiapps/suite/utils/image/ImageUtils;->getImageType(Ljava/io/InputStream;)Ljava/lang/String;
    :try_end_13
    .catch Ljava/io/IOException; {:try_start_10 .. :try_end_13} :catch_31
    .catchall {:try_start_10 .. :try_end_13} :catchall_2e

    move-result-object v3

    .line 584
    .local v3, "type":Ljava/lang/String;
    if-eqz v2, :cond_9

    .line 585
    :try_start_16
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_19
    .catch Ljava/io/IOException; {:try_start_16 .. :try_end_19} :catch_1a

    goto :goto_9

    .line 587
    :catch_1a
    move-exception v4

    goto :goto_9

    .line 580
    .end local v2    # "in":Ljava/io/InputStream;
    .end local v3    # "type":Ljava/lang/String;
    .restart local v1    # "in":Ljava/io/InputStream;
    :catch_1c
    move-exception v0

    .line 584
    .local v0, "e":Ljava/io/IOException;
    :goto_1d
    if-eqz v1, :cond_9

    .line 585
    :try_start_1f
    invoke-virtual {v1}, Ljava/io/InputStream;->close()V
    :try_end_22
    .catch Ljava/io/IOException; {:try_start_1f .. :try_end_22} :catch_23

    goto :goto_9

    .line 587
    :catch_23
    move-exception v4

    goto :goto_9

    .line 583
    .end local v0    # "e":Ljava/io/IOException;
    :catchall_25
    move-exception v4

    .line 584
    :goto_26
    if-eqz v1, :cond_2b

    .line 585
    :try_start_28
    invoke-virtual {v1}, Ljava/io/InputStream;->close()V
    :try_end_2b
    .catch Ljava/io/IOException; {:try_start_28 .. :try_end_2b} :catch_2c

    .line 588
    :cond_2b
    :goto_2b
    throw v4

    .line 587
    :catch_2c
    move-exception v5

    goto :goto_2b

    .line 583
    .end local v1    # "in":Ljava/io/InputStream;
    .restart local v2    # "in":Ljava/io/InputStream;
    :catchall_2e
    move-exception v4

    move-object v1, v2

    .end local v2    # "in":Ljava/io/InputStream;
    .restart local v1    # "in":Ljava/io/InputStream;
    goto :goto_26

    .line 580
    .end local v1    # "in":Ljava/io/InputStream;
    .restart local v2    # "in":Ljava/io/InputStream;
    :catch_31
    move-exception v0

    move-object v1, v2

    .end local v2    # "in":Ljava/io/InputStream;
    .restart local v1    # "in":Ljava/io/InputStream;
    goto :goto_1d
.end method

.method public static getImageType(Ljava/io/InputStream;)Ljava/lang/String;
    .registers 5
    .param p0, "in"    # Ljava/io/InputStream;

    .prologue
    const/4 v2, 0x0

    .line 600
    if-nez p0, :cond_4

    .line 608
    :goto_3
    return-object v2

    .line 604
    :cond_4
    const/16 v3, 0x8

    :try_start_6
    new-array v0, v3, [B

    .line 605
    .local v0, "bytes":[B
    invoke-virtual {p0, v0}, Ljava/io/InputStream;->read([B)I

    .line 606
    invoke-static {v0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->getImageType([B)Ljava/lang/String;
    :try_end_e
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_e} :catch_10

    move-result-object v2

    goto :goto_3

    .line 607
    .end local v0    # "bytes":[B
    :catch_10
    move-exception v1

    .line 608
    .local v1, "e":Ljava/io/IOException;
    goto :goto_3
.end method

.method public static getImageType([B)Ljava/lang/String;
    .registers 2
    .param p0, "bytes"    # [B

    .prologue
    .line 620
    invoke-static {p0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->isJPEG([B)Z

    move-result v0

    if-eqz v0, :cond_9

    .line 621
    const-string v0, "image/jpeg"

    .line 632
    :goto_8
    return-object v0

    .line 623
    :cond_9
    invoke-static {p0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->isGIF([B)Z

    move-result v0

    if-eqz v0, :cond_12

    .line 624
    const-string v0, "image/gif"

    goto :goto_8

    .line 626
    :cond_12
    invoke-static {p0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->isPNG([B)Z

    move-result v0

    if-eqz v0, :cond_1b

    .line 627
    const-string v0, "image/png"

    goto :goto_8

    .line 629
    :cond_1b
    invoke-static {p0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->isBMP([B)Z

    move-result v0

    if-eqz v0, :cond_24

    .line 630
    const-string v0, "application/x-bmp"

    goto :goto_8

    .line 632
    :cond_24
    const/4 v0, 0x0

    goto :goto_8
.end method

.method public static getLatestImage(Landroid/app/Activity;)Ljava/lang/String;
    .registers 10
    .param p0, "context"    # Landroid/app/Activity;

    .prologue
    const/4 v3, 0x0

    const/4 v8, 0x1

    .line 314
    const/4 v7, 0x0

    .line 315
    .local v7, "latestImage":Ljava/lang/String;
    const/4 v0, 0x2

    new-array v2, v0, [Ljava/lang/String;

    const/4 v0, 0x0

    const-string v1, "_id"

    aput-object v1, v2, v0

    const-string v0, "_data"

    aput-object v0, v2, v8

    .line 316
    .local v2, "items":[Ljava/lang/String;
    sget-object v1, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    const-string v5, "_id desc"

    move-object v0, p0

    move-object v4, v3

    invoke-virtual/range {v0 .. v5}, Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 318
    .local v6, "cursor":Landroid/database/Cursor;
    if-eqz v6, :cond_31

    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_31

    .line 319
    invoke-interface {v6}, Landroid/database/Cursor;->moveToFirst()Z

    .line 320
    invoke-interface {v6}, Landroid/database/Cursor;->moveToFirst()Z

    invoke-interface {v6}, Landroid/database/Cursor;->isAfterLast()Z

    move-result v0

    if-nez v0, :cond_31

    .line 321
    invoke-interface {v6, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v7

    .line 326
    :cond_31
    return-object v7
.end method

.method public static getRoundedCornerBitmap(Landroid/graphics/Bitmap;F)Landroid/graphics/Bitmap;
    .registers 12
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;
    .param p1, "roundPx"    # F

    .prologue
    const/4 v9, 0x0

    .line 498
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v6

    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v7

    sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v6, v7, v8}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 499
    .local v2, "output":Landroid/graphics/Bitmap;
    new-instance v0, Landroid/graphics/Canvas;

    invoke-direct {v0, v2}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 501
    .local v0, "canvas":Landroid/graphics/Canvas;
    const v1, -0xbdbdbe

    .line 502
    .local v1, "color":I
    new-instance v3, Landroid/graphics/Paint;

    invoke-direct {v3}, Landroid/graphics/Paint;-><init>()V

    .line 503
    .local v3, "paint":Landroid/graphics/Paint;
    new-instance v4, Landroid/graphics/Rect;

    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v6

    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v7

    invoke-direct {v4, v9, v9, v6, v7}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 504
    .local v4, "rect":Landroid/graphics/Rect;
    new-instance v5, Landroid/graphics/RectF;

    invoke-direct {v5, v4}, Landroid/graphics/RectF;-><init>(Landroid/graphics/Rect;)V

    .line 506
    .local v5, "rectF":Landroid/graphics/RectF;
    const/4 v6, 0x1

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 507
    invoke-virtual {v0, v9, v9, v9, v9}, Landroid/graphics/Canvas;->drawARGB(IIII)V

    .line 508
    const v6, -0xbdbdbe

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setColor(I)V

    .line 509
    invoke-virtual {v0, v5, p1, p1, v3}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 511
    new-instance v6, Landroid/graphics/PorterDuffXfermode;

    sget-object v7, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v6, v7}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 512
    invoke-virtual {v0, p0, v4, v4, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 514
    return-object v2
.end method

.method public static getTempFileName()Ljava/lang/String;
    .registers 6

    .prologue
    .line 217
    new-instance v1, Ljava/text/SimpleDateFormat;

    const-string v2, "yyyy-MM-dd_HH-mm-ss_SS"

    invoke-direct {v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 218
    .local v1, "format":Ljava/text/SimpleDateFormat;
    new-instance v2, Ljava/sql/Timestamp;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-direct {v2, v4, v5}, Ljava/sql/Timestamp;-><init>(J)V

    invoke-virtual {v1, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v0

    .line 219
    .local v0, "fileName":Ljava/lang/String;
    return-object v0
.end method

.method private static isBMP([B)Z
    .registers 5
    .param p0, "b"    # [B

    .prologue
    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 658
    array-length v2, p0

    const/4 v3, 0x2

    if-ge v2, v3, :cond_7

    .line 661
    :goto_6
    return v1

    :cond_7
    aget-byte v2, p0, v1

    const/16 v3, 0x42

    if-ne v2, v3, :cond_15

    aget-byte v2, p0, v0

    const/16 v3, 0x4d

    if-ne v2, v3, :cond_15

    :goto_13
    move v1, v0

    goto :goto_6

    :cond_15
    move v0, v1

    goto :goto_13
.end method

.method private static isGIF([B)Z
    .registers 6
    .param p0, "b"    # [B

    .prologue
    const/4 v4, 0x4

    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 643
    array-length v2, p0

    const/4 v3, 0x6

    if-ge v2, v3, :cond_8

    .line 646
    :goto_7
    return v1

    :cond_8
    aget-byte v2, p0, v1

    const/16 v3, 0x47

    if-ne v2, v3, :cond_37

    aget-byte v2, p0, v0

    const/16 v3, 0x49

    if-ne v2, v3, :cond_37

    const/4 v2, 0x2

    aget-byte v2, p0, v2

    const/16 v3, 0x46

    if-ne v2, v3, :cond_37

    const/4 v2, 0x3

    aget-byte v2, p0, v2

    const/16 v3, 0x38

    if-ne v2, v3, :cond_37

    aget-byte v2, p0, v4

    const/16 v3, 0x37

    if-eq v2, v3, :cond_2e

    aget-byte v2, p0, v4

    const/16 v3, 0x39

    if-ne v2, v3, :cond_37

    :cond_2e
    const/4 v2, 0x5

    aget-byte v2, p0, v2

    const/16 v3, 0x61

    if-ne v2, v3, :cond_37

    :goto_35
    move v1, v0

    goto :goto_7

    :cond_37
    move v0, v1

    goto :goto_35
.end method

.method private static isJPEG([B)Z
    .registers 5
    .param p0, "b"    # [B

    .prologue
    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 636
    array-length v2, p0

    const/4 v3, 0x2

    if-ge v2, v3, :cond_7

    .line 639
    :goto_6
    return v1

    :cond_7
    aget-byte v2, p0, v1

    const/4 v3, -0x1

    if-ne v2, v3, :cond_14

    aget-byte v2, p0, v0

    const/16 v3, -0x28

    if-ne v2, v3, :cond_14

    :goto_12
    move v1, v0

    goto :goto_6

    :cond_14
    move v0, v1

    goto :goto_12
.end method

.method private static isPNG([B)Z
    .registers 6
    .param p0, "b"    # [B

    .prologue
    const/16 v4, 0xa

    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 650
    array-length v2, p0

    const/16 v3, 0x8

    if-ge v2, v3, :cond_a

    .line 653
    :goto_9
    return v1

    :cond_a
    aget-byte v2, p0, v1

    const/16 v3, -0x77

    if-ne v2, v3, :cond_3e

    aget-byte v2, p0, v0

    const/16 v3, 0x50

    if-ne v2, v3, :cond_3e

    const/4 v2, 0x2

    aget-byte v2, p0, v2

    const/16 v3, 0x4e

    if-ne v2, v3, :cond_3e

    const/4 v2, 0x3

    aget-byte v2, p0, v2

    const/16 v3, 0x47

    if-ne v2, v3, :cond_3e

    const/4 v2, 0x4

    aget-byte v2, p0, v2

    const/16 v3, 0xd

    if-ne v2, v3, :cond_3e

    const/4 v2, 0x5

    aget-byte v2, p0, v2

    if-ne v2, v4, :cond_3e

    const/4 v2, 0x6

    aget-byte v2, p0, v2

    const/16 v3, 0x1a

    if-ne v2, v3, :cond_3e

    const/4 v2, 0x7

    aget-byte v2, p0, v2

    if-ne v2, v4, :cond_3e

    :goto_3c
    move v1, v0

    goto :goto_9

    :cond_3e
    move v0, v1

    goto :goto_3c
.end method

.method public static loadImgThumbnail(Landroid/app/Activity;Ljava/lang/String;I)Landroid/graphics/Bitmap;
    .registers 15
    .param p0, "context"    # Landroid/app/Activity;
    .param p1, "imgName"    # Ljava/lang/String;
    .param p2, "kind"    # I

    .prologue
    const/4 v4, 0x0

    const/4 v11, 0x1

    const/4 v10, 0x0

    .line 288
    const/4 v6, 0x0

    .line 290
    .local v6, "bitmap":Landroid/graphics/Bitmap;
    const/4 v0, 0x2

    new-array v2, v0, [Ljava/lang/String;

    const-string v0, "_id"

    aput-object v0, v2, v10

    const-string v0, "_display_name"

    aput-object v0, v2, v11

    .line 292
    .local v2, "proj":[Ljava/lang/String;
    sget-object v1, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "_display_name=\'"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v3, "\'"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    move-object v0, p0

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v8

    .line 294
    .local v8, "cursor":Landroid/database/Cursor;
    if-eqz v8, :cond_52

    invoke-interface {v8}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_52

    invoke-interface {v8}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0

    if-eqz v0, :cond_52

    .line 295
    invoke-virtual {p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v7

    .line 296
    .local v7, "crThumb":Landroid/content/ContentResolver;
    new-instance v9, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v9}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 297
    .local v9, "options":Landroid/graphics/BitmapFactory$Options;
    iput v11, v9, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 298
    invoke-interface {v8, v10}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    int-to-long v0, v0

    invoke-static {v7, v0, v1, p2, v9}, Lcom/zuiapps/suite/utils/image/MethodsCompat;->getThumbnail(Landroid/content/ContentResolver;JILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v6

    .line 300
    .end local v7    # "crThumb":Landroid/content/ContentResolver;
    .end local v9    # "options":Landroid/graphics/BitmapFactory$Options;
    :cond_52
    return-object v6
.end method

.method public static loadImgThumbnail(Ljava/lang/String;II)Landroid/graphics/Bitmap;
    .registers 5
    .param p0, "filePath"    # Ljava/lang/String;
    .param p1, "w"    # I
    .param p2, "h"    # I

    .prologue
    .line 304
    invoke-static {p0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->getBitmapByPath(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 305
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    invoke-static {v0, p1, p2}, Lcom/zuiapps/suite/utils/image/ImageUtils;->zoomBitmap(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;

    move-result-object v1

    return-object v1
.end method

.method public static reDrawBitmap(Landroid/app/Activity;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .registers 16
    .param p0, "context"    # Landroid/app/Activity;
    .param p1, "bitmap"    # Landroid/graphics/Bitmap;

    .prologue
    const/4 v1, 0x0

    .line 428
    new-instance v7, Landroid/util/DisplayMetrics;

    invoke-direct {v7}, Landroid/util/DisplayMetrics;-><init>()V

    .line 429
    .local v7, "dm":Landroid/util/DisplayMetrics;
    invoke-virtual {p0}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v0

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    invoke-virtual {v0, v7}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 430
    iget v9, v7, Landroid/util/DisplayMetrics;->heightPixels:I

    .line 431
    .local v9, "rHeight":I
    iget v10, v7, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 436
    .local v10, "rWidth":I
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v8

    .line 437
    .local v8, "height":I
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v12

    .line 459
    .local v12, "width":I
    if-lt v12, v10, :cond_3b

    .line 460
    int-to-float v0, v10

    int-to-float v2, v12

    div-float v13, v0, v2

    .line 464
    .local v13, "zoomScale":F
    :goto_23
    new-instance v5, Landroid/graphics/Matrix;

    invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V

    .line 466
    .local v5, "matrix":Landroid/graphics/Matrix;
    invoke-virtual {v5, v13, v13}, Landroid/graphics/Matrix;->postScale(FF)Z

    .line 467
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    const/4 v6, 0x1

    move-object v0, p1

    move v2, v1

    invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v11

    .line 468
    .local v11, "resizedBitmap":Landroid/graphics/Bitmap;
    return-object v11

    .line 462
    .end local v5    # "matrix":Landroid/graphics/Matrix;
    .end local v11    # "resizedBitmap":Landroid/graphics/Bitmap;
    .end local v13    # "zoomScale":F
    :cond_3b
    const/high16 v13, 0x3f800000

    .restart local v13    # "zoomScale":F
    goto :goto_23
.end method

.method public static saveImage(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .registers 4
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "fileName"    # Ljava/lang/String;
    .param p2, "bitmap"    # Landroid/graphics/Bitmap;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 88
    const/16 v0, 0x64

    invoke-static {p0, p1, p2, v0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->saveImage(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;I)V

    .line 89
    return-void
.end method

.method public static saveImage(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
    .registers 8
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "fileName"    # Ljava/lang/String;
    .param p2, "bitmap"    # Landroid/graphics/Bitmap;
    .param p3, "quality"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 92
    if-eqz p2, :cond_6

    if-eqz p1, :cond_6

    if-nez p0, :cond_7

    .line 101
    :cond_6
    :goto_6
    return-void

    .line 95
    :cond_7
    const/4 v3, 0x0

    invoke-virtual {p0, p1, v3}, Landroid/content/Context;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;

    move-result-object v1

    .line 96
    .local v1, "fos":Ljava/io/FileOutputStream;
    new-instance v2, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v2}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 97
    .local v2, "stream":Ljava/io/ByteArrayOutputStream;
    sget-object v3, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    invoke-virtual {p2, v3, p3, v2}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 98
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v0

    .line 99
    .local v0, "bytes":[B
    invoke-virtual {v1, v0}, Ljava/io/FileOutputStream;->write([B)V

    .line 100
    invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V

    goto :goto_6
.end method

.method public static saveImageToSD(Ljava/lang/String;Landroid/graphics/Bitmap;I)V
    .registers 4
    .param p0, "filePath"    # Ljava/lang/String;
    .param p1, "bitmap"    # Landroid/graphics/Bitmap;
    .param p2, "quality"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 109
    sget-object v0, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    invoke-static {p0, p1, p2, v0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->saveImageToSD(Ljava/lang/String;Landroid/graphics/Bitmap;ILandroid/graphics/Bitmap$CompressFormat;)V

    .line 110
    return-void
.end method

.method public static saveImageToSD(Ljava/lang/String;Landroid/graphics/Bitmap;ILandroid/graphics/Bitmap$CompressFormat;)V
    .registers 7
    .param p0, "pFilePath"    # Ljava/lang/String;
    .param p1, "pBitmap"    # Landroid/graphics/Bitmap;
    .param p2, "pQuality"    # I
    .param p3, "pCompressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 118
    if-eqz p1, :cond_19

    .line 119
    new-instance v1, Ljava/io/FileOutputStream;

    invoke-direct {v1, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    .line 120
    .local v1, "fos":Ljava/io/FileOutputStream;
    new-instance v2, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v2}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 121
    .local v2, "stream":Ljava/io/ByteArrayOutputStream;
    invoke-virtual {p1, p3, p2, v2}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 122
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v0

    .line 124
    .local v0, "bytes":[B
    invoke-virtual {v1, v0}, Ljava/io/FileOutputStream;->write([B)V

    .line 125
    invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V

    .line 127
    .end local v0    # "bytes":[B
    .end local v1    # "fos":Ljava/io/FileOutputStream;
    .end local v2    # "stream":Ljava/io/ByteArrayOutputStream;
    :cond_19
    return-void
.end method

.method public static scaleBitmap(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .registers 13
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;

    .prologue
    const/4 v1, 0x0

    .line 400
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    .line 401
    .local v3, "width":I
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    .line 403
    .local v4, "height":I
    const/16 v8, 0xc8

    .line 404
    .local v8, "newWidth":I
    const/16 v7, 0xc8

    .line 406
    .local v7, "newHeight":I
    int-to-float v0, v8

    int-to-float v2, v3

    div-float v11, v0, v2

    .line 407
    .local v11, "scaleWidth":F
    int-to-float v0, v7

    int-to-float v2, v4

    div-float v10, v0, v2

    .line 409
    .local v10, "scaleHeight":F
    new-instance v5, Landroid/graphics/Matrix;

    invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V

    .line 411
    .local v5, "matrix":Landroid/graphics/Matrix;
    invoke-virtual {v5, v11, v10}, Landroid/graphics/Matrix;->postScale(FF)Z

    .line 415
    const/4 v6, 0x1

    move-object v0, p0

    move v2, v1

    invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v9

    .line 416
    .local v9, "resizedBitmap":Landroid/graphics/Bitmap;
    return-object v9
.end method

.method public static scaleImageSize([II)[I
    .registers 10
    .param p0, "img_size"    # [I
    .param p1, "square_size"    # I

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

    .line 337
    aget v2, p0, v6

    if-gt v2, p1, :cond_b

    aget v2, p0, v7

    if-gt v2, p1, :cond_b

    .line 340
    .end local p0    # "img_size":[I
    :goto_a
    return-object p0

    .line 339
    .restart local p0    # "img_size":[I
    :cond_b
    int-to-double v2, p1

    aget v4, p0, v6

    aget v5, p0, v7

    invoke-static {v4, v5}, Ljava/lang/Math;->max(II)I

    move-result v4

    int-to-double v4, v4

    div-double v0, v2, v4

    .line 340
    .local v0, "ratio":D
    const/4 v2, 0x2

    new-array v2, v2, [I

    aget v3, p0, v6

    int-to-double v4, v3

    mul-double/2addr v4, v0

    double-to-int v3, v4

    aput v3, v2, v6

    aget v3, p0, v7

    int-to-double v4, v3

    mul-double/2addr v4, v0

    double-to-int v3, v4

    aput v3, v2, v7

    move-object p0, v2

    goto :goto_a
.end method

.method public static zoomBitmap(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;
    .registers 13
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;
    .param p1, "w"    # I
    .param p2, "h"    # I

    .prologue
    const/4 v1, 0x0

    .line 385
    const/4 v7, 0x0

    .line 386
    .local v7, "newbmp":Landroid/graphics/Bitmap;
    if-eqz p0, :cond_23

    .line 387
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    .line 388
    .local v3, "width":I
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    .line 389
    .local v4, "height":I
    new-instance v5, Landroid/graphics/Matrix;

    invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V

    .line 390
    .local v5, "matrix":Landroid/graphics/Matrix;
    int-to-float v0, p1

    int-to-float v2, v3

    div-float v9, v0, v2

    .line 391
    .local v9, "scaleWidht":F
    int-to-float v0, p2

    int-to-float v2, v4

    div-float v8, v0, v2

    .line 392
    .local v8, "scaleHeight":F
    invoke-virtual {v5, v9, v8}, Landroid/graphics/Matrix;->postScale(FF)Z

    .line 393
    const/4 v6, 0x1

    move-object v0, p0

    move v2, v1

    invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v7

    .line 395
    .end local v3    # "width":I
    .end local v4    # "height":I
    .end local v5    # "matrix":Landroid/graphics/Matrix;
    .end local v8    # "scaleHeight":F
    .end local v9    # "scaleWidht":F
    :cond_23
    return-object v7
.end method
